console.log("hi");
chrome.extension.sendRequest({greeting: "hello"}, function(response) {
	console.log(response.farewell);
	if(response.farewell == ""){
		console.log("No events");
	}
	else
	{
		var msgs = response.farewell.split("|");
		function printNotification(element, index, array){
			console.log(element);
			if(element != ""){
				if(element == "You have lost a battle.")
					Notifier.error(element);
				else
					Notifier.success(element);
			}
		}
		msgs.forEach(printNotification);
	}
});